﻿@model PaPaPa.Web.Models.Datings.DatingInfoViewModel

@{
    ViewBag.Title = "创建约会信息";
    Layout = "~/Areas/Basic/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>

@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("Create", "DatingInfo", FormMethod.Post))
    {
        @Html.AntiForgeryToken()

        <div class="form-horizontal">
            @if (!string.IsNullOrWhiteSpace(ViewBag.StatusMessage))
            {
                <div class="alert alert-success" role="alert">@ViewBag.StatusMessage</div>
            }
            <hr />
            @Html.ValidationSummary(true)

            <div class="form-group">
                @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.DatingTime, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.DatingTime, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.DatingTime)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Address, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.Address, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Address)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.Description, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Description)
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="保存" class="btn btn-default" />
                </div>
            </div>
        </div>
    }

    <!--
    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
    -->
    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
    }
}
else
{
    <p>请先登录。</p>
}
